package com.cyq.service.Impl;

import com.cyq.mapper.ShopMapper;
import com.cyq.pojo.Login;
import com.cyq.pojo.Product;
import com.cyq.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopServiceImpl implements ShopService {

    @Autowired
    ShopMapper shopMapper;
    @Override
    public Login getPWDbyName(String name) {
        return shopMapper.getPWDByName(name);
    }

    @Override
    public List<Product> getProductList() {
        return shopMapper.getProductList();
    }

    @Override
    public Product getProductById(int id) {
        return shopMapper.getProductById(id);
    }

    @Override
    public Login getUserById(int id) {
        return shopMapper.getUserById(id);
    }
}
